/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercises.day02.pt01;

import java.util.Scanner;

/**
 *
 * @author (jaice)
 * @version 0.1 (may 28, 2012)
 * 
 * c. Design and implement a class called Card that represents a standard
 * playing card. Each card has a suit and a face value. Create a class called
 * DeckOfCards that stores 52 objects of the Card class. Include methods to shuffle
 * the deck, deal a card, and report the number of cards left in the deck. The shuffle 
 * method should assume a full deck. Create a test class with a main method that deals 
 * each card from a shuffled deck, printing each card as it is dealt.
 * 
 * 
 */
public class CardMain {

    /**
     * main method
     * @param args 
     */
    public static void main(String args[]) {

        
        //how many cards dealed
        int count = 0;
        
        //instantiate deck
        Deck d = new Deck();

        //first time shiffle deck
        d.shuffleDeck();

        //scanner
        Scanner sc = new Scanner(System.in);

        do {
            //prints card
            System.out.println(d.dealCard() + " dealed " + (count+1) + " cards");
            count++;



        } while (d.cardsLeft() > 1);

        //end game
        if (d.cardsLeft() == 0) {
            System.out.println("No more cards. Game ends");
        }
    }
}
